# Maintainer: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
# This package is in search of a new maintainer
pkgname=ampy
_pkgname=adafruit-ampy
pkgver=1.1.0
pkgrel=5
pkgdesc="Utility to interact with a MicroPython board over a serial connection"
url="https://github.com/scientifichackers/ampy"
arch="noarch"
license="MIT"
depends="
	py3-click
	py3-dotenv
	py3-pyserial
	python3
	"
makedepends="py3-setuptools"
subpackages="$pkgname-doc $pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

prepare() {
	default_prepare
	touch CONTRIBUTING.md
}

build() {
	python3 setup.py build
}

check() {
	python3 setup.py check
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"

	mkdir -p "$pkgdir"/usr/share/doc/$pkgname/
	install -m644 README.md "$pkgdir"/usr/share/doc/$pkgname/
}

sha512sums="
b06a1007cda17d29c6441c2b8c7d5f7e40e41783e87334791254654d6a6157768af7a4c5b348f8b64620b47a4d86cd86d45bdb02be18c7a146deab74c4935645  adafruit-ampy-1.1.0.tar.gz
"
